﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Linq.Expressions;

namespace Catalyst.Web.DynamicData
{
    public interface IDynamicExpressionParameter
    {
        /// <summary>
        /// The method responsible for building a LambdaExpression to be evaluated against the target object.
        /// </summary>
        /// <param name="itType">The type of object the LambdaExpression is evaluated against.</param>
        /// <returns>The LambdaExpression.</returns>
        LambdaExpression GetLambdaExpression(Type itType);
        
        /// <summary>
        /// This appends the LambdaExpression returned by GetLambdaExpression to the IQueryable provided.
        /// </summary>
        /// <param name="query">The Query to append the LambdaExpression with.</param>
        /// <returns>The combined IQueryable of query and GetLambdaExpression.</returns>
        IQueryable AppendQuery(IQueryable query);
    }
}
